package com.vcms.cms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SiteAttr entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "site_attr", catalog = "vcms_0.1")
public class SiteAttr implements java.io.Serializable {

	// Fields

	private Integer siteAttrId;
	private Site site;
	private String attrName;
	private String attrValue;

	// Constructors

	/** default constructor */
	public SiteAttr() {
	}

	/** full constructor */
	public SiteAttr(Site site, String attrName, String attrValue) {
		this.site = site;
		this.attrName = attrName;
		this.attrValue = attrValue;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "siteAttrId", unique = true, nullable = false)
	public Integer getSiteAttrId() {
		return this.siteAttrId;
	}

	public void setSiteAttrId(Integer siteAttrId) {
		this.siteAttrId = siteAttrId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "siteId")
	public Site getSite() {
		return this.site;
	}

	public void setSite(Site site) {
		this.site = site;
	}

	@Column(name = "attrName", length = 100)
	public String getAttrName() {
		return this.attrName;
	}

	public void setAttrName(String attrName) {
		this.attrName = attrName;
	}

	@Column(name = "attrValue", length = 100)
	public String getAttrValue() {
		return this.attrValue;
	}

	public void setAttrValue(String attrValue) {
		this.attrValue = attrValue;
	}

}